package com.yh.correct.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yh.correct.dao.IMessageMapper;
import com.yh.correct.model.Message;
import com.yh.correct.service.IMessageService;
/**
 * 信息滚利服务层接口实现类
 * @author 崔赛赛
 *
 */
    @Service
public class MessageServiceImpl implements IMessageService {
    //实例化短信 接口
	@Autowired
	 private IMessageMapper MessageMapper;
	@Override
	public Integer addMessage(Message message) {
		// 返回添加信息
		return MessageMapper.addMessage(message);
	}

	@Override
	public Integer delMessage(Integer id) {
		// 返回删除信息
		return MessageMapper.delMessage(id);
	}

	@Override
	public Integer editMessage(Message message) {
		// 返回编辑信息
		return MessageMapper.editMessage(message);
	}

	@Override
	public List<Message> getALLMessage() {
		// 返回查询所有信息
		return MessageMapper.getALLMessage();
	}

	@Override
	public Message getMessage(Integer id) {
		// 返回根据id查询信息
		return MessageMapper.getMessage(id);
	}

	@Override
	public List<Object> getLikeMessage(Map<String, Object> message) {
	   //返回模糊查询信息
		return MessageMapper.getLikeMessage(message);
	}

	@Override
	public int getLikeMessageCount(Map<String, Object> message) {
		//返回模糊查询信息数量
		return MessageMapper.getLikeMessageCount(message);
	}

}
